<template>
<div>
    <h1>App根组件-----{{count}}</h1>
    <button @click="count+=1">+1</button>
    <!-- :number用于接收props里面的值 -->
    <!-- v-model用于同步子组件里面的那个自定义参数传过来的值 -->
    <MyCounter v-model:number="count"></MyCounter>
</div>
</template>

<script>
import MyCounter from './Counter.vue';
export default{
    name:'MyApp',
    data() {
        return {
            count:0,
        }
    },
    components:{
        // components用于注册导入的组件
        MyCounter
    }
}
</script>

<style>
</style>